home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / aztecnos.arc / NETUSER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-19  |  1.3 KB  |  50 lines

  1. /* Global structures and constants needed by an Internet user process */
  2. #ifndef    NCONN
  3.  
  4. #include "global.h"
  5.  
  6. #define    NCONN    20        /* Maximum number of open network connections */
  7.  
  8. extern char Hosts[];     /* Host table */
  9. extern int32 Ip_addr;    /* Our IP address */
  10. extern int Net_error;    /* Error return code */
  11. #define    NONE    0        /* No error */
  12. #define    CON_EXISTS    1    /* Connection already exists */
  13. #define    NO_CONN    2        /* Connection does not exist */
  14. #define    CON_CLOS    3    /* Connection closing */
  15. #define    NO_SPACE    4    /* No memory for TCB creation */
  16. #define    WOULDBLK    5    /* Would block */
  17. #define    NOPROTO        6    /* Protocol or mode not supported */
  18. #define    INVALID        7    /* Invalid arguments */
  19.  
  20. /* Codes for the tcp_open call */
  21. #define    TCP_PASSIVE    0
  22. #define    TCP_ACTIVE    1
  23. #define    TCP_SERVER    2    /* Passive, clone on opening */
  24.  
  25. /* Socket structure */
  26. struct socket {
  27.     int32 address;        /* IP address */
  28.     int16 port;        /* port number */
  29. };
  30. #define    NULLSOCK    (struct socket *)0
  31.  
  32. /* Connection structure (two sockets) */
  33. struct connection {
  34.     struct socket local;
  35.     struct socket remote;
  36. };
  37. #if    defined(__STDC__) || defined(__TURBOC__)
  38. int32 dresolve(char *name);
  39. int32 resolve(char *name);
  40. #else
  41. int32 dresolve();
  42. int32 resolve();
  43. #endif
  44.  
  45. int32 aton(),resolve();
  46. char *inet_ntoa(),*psocket();
  47.  
  48.  
  49. #endif    /* NCONN */
  50.